public class Job8 {
    public static void main(String[] args) {
        int a = 0;
        int b;
        for (int i =2 ;i<=10000 ; i++) {
            for (b= 2; i % b != 0 && b * b < i; b++) ;
            if (b * b > i) {
                a++;
                System.out.print(i+"\n");
            }
        }
    }
}
